package se19team1e.dao.abstrakt.jaas;

import java.util.List;

import se19team1e.dao.abstrakt.generics.DataAccessObject;
import se19team1e.entity.JobAdvertDTO;
import se19team1e.exception.DataAccessException;

/**
 * An abstract DAO interface to manipulate the Job Advert objects in the
 * persistence storage.
 * 
 * <p>
 * This interface is referenced by controllers, such that the underlying
 * persistence mechanism can be swapped out easily in the future.
 * </p>
 * 
 * @author Arun Manivannan
 * 
 */

public interface JobAdvertDAO extends DataAccessObject<JobAdvertDTO> {
	/**
	 * Create the Job advert DAO using interface DataAccessObject
	 * 
	 * @param JobadvertDTO
	 *            The Job advert dto
	 * @throws DataAccessException
	 */
	@Override
	public boolean create(JobAdvertDTO dtoType) throws DataAccessException;

	/**
	 * Deletes an existing Job advert object from the persistence storage by the
	 * given id.
	 * 
	 * @param idType
	 *            ID of the Job advert object to be deleted
	 * @return success state
	 * @throws DataAccessException
	 */
	@Override
	public boolean delete(Object idType) throws DataAccessException;

	/**
	 * Retrieve all Job advert objects in the persistence storage.
	 * 
	 * @return list of Job advert DataTransfer objects
	 * @throws DataAccessException
	 */
	@Override
	public List<JobAdvertDTO> retrieveAll() throws DataAccessException;

	/**
	 * Gets an existing Job advert object from the persistence storage by the
	 * given id.
	 * 
	 * @param idType
	 *            ID of the Job advert object
	 * @return Object Job advert object specified by the ID
	 * @throws DataAccessException
	 */
	@Override
	public JobAdvertDTO retrieveById(Object idType) throws DataAccessException;

	/**
	 * Updates the delta of an existing Job advert object to the persistence
	 * storage.
	 * 
	 * @param AccountDTO
	 *            dto type is Department
	 * @return Object which is an updated Job advert DTO
	 * @throws DataAccessException
	 */
	@Override
	public JobAdvertDTO update(JobAdvertDTO dtoType) throws DataAccessException;

	/**
	 * Get all the fields in the Job Advert DAO and put them in a list
	 * @return List of fields
	 * @throws DataAccessException
	 */
	public List<String> getFields() throws DataAccessException;

}
